﻿// Copyright (c) Vitaly Kamiansky. All rights reserved. 
// See License.txt in the project root.

using System;

namespace Property.Reloaders
{
    public partial class ReactiveReloaderPrototype<T> : ReloaderPrototype<T>
    {
        public ReactiveReloaderPrototype(ISequenceConveyor<T> sequenceConveyor)
        {
            _SequenceConveyor = sequenceConveyor;
        }

        //=//

        private readonly ISequenceConveyor<T> _SequenceConveyor;

        public override IReloader Create(Func<T> getValue, Action<T> applyValue, Action<bool> applyStatus)
        {
            return new ReloaderInstance(_SequenceConveyor, getValue, applyValue, applyStatus);
        }
    }
}
